local more1new__shi__quanlve = fk.CreateSkill {
  name = "more1new__shi__quanlve",
}

Fk:loadTranslationTable{
  ["more1new__shi__quanlve"] = "权略",
  [":more1new__shi__quanlve"] = "每回合限一次，你可以弃置一半手牌（向上取整），然后视为使用一张本局游戏内未以此法使用过的普通锦囊牌",
  ["#more1new__shi__quanlve-choice"] = "选择一张普通锦囊牌使用",
  ["$more1new__shi__quanlve1"] = "",
  ["$more1new__shi__quanlve2"] = "",
  ["@$more1new__shi__quanlve"] = "权略",
}
local U = require "packages.utility.utility"

more1new__shi__quanlve:addEffect("viewas", {
  pattern = ".",
  prompt = function (self, player, selected_cards, selected)
    return "#more1new__shi__quanlve-choice"
  end,
  interaction = function(self, player)
    local all_names = Fk:getAllCardNames("t")
    local names = player:getViewAsCardNames(more1new__shi__quanlve.name, all_names, nil, player:getTableMark("@$more1new__shi__quanlve"))
    if #names == 0 then return end
    return UI.CardNameBox {choices = names, all_choices = all_names}
  end,
  card_filter = Util.FalseFunc,
  view_as = function(self, player, cards)
    if not self.interaction.data then return end
    local card = Fk:cloneCard(self.interaction.data)
    card.skillName = more1new__shi__quanlve.name
    return card
  end,
  before_use = function(self, player, use)
    player.room:addTableMark(player, "@$more1new__shi__quanlve", use.card.trueName)
        local n = (player:getHandcardNum() + 1) // 2
        player.room:askToDiscard(player, {
          min_num = n,
          max_num = n,
          include_equip = false,
          skill_name = more1new__shi__quanlve.name,
          cancelable = false,
        })
  end,
  enabled_at_play = function(self, player)
    return not player:isKongcheng() and player:usedSkillTimes(self.name, Player.HistoryTurn) == 0
  end,
  enabled_at_response = function(self, player, response)
    return not player:isKongcheng() and player:usedSkillTimes(self.name, Player.HistoryTurn) == 0
  end,
})














return more1new__shi__quanlve
